package com.chis.ms;

import java.io.*;
import java.util.ArrayList;
import java.util.List;

public class T123 {

    public static void main(String[] args) {
        File file1 = new File("C:\\Users\\wlj\\Desktop\\aa.txt");
        FileReader m = null;
        try {
            m = new FileReader(file1);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        BufferedReader reader = new BufferedReader(m);
        List<String>  ll = new ArrayList<>();
        Integer sssd = 0;
        while (true) {
            String nextline = null;
            try {
                nextline = reader.readLine();
                if (nextline != null && nextline.length() > 0) {
                    String[] d = nextline.split("#");
                    if(!ll.contains(d[0])){
                        System.out.println(d[0]);
                        ll.add(d[0]);
                    }

//                    String d = nextline.substring(nextline.indexOf("#")+1);
//                    if(!ll.contains(d)) {
//                        System.out.println(d);
//                        ll.add(d);
//                        String mm = nextline.substring(nextline.lastIndexOf("#") + 1);
//                        sssd = sssd + Integer.valueOf(mm);
//                    }

//                    String[] d = nextline.split("#");
//                    if(!ll.contains(d[2])){
//                        System.out.println(d[2]);
//                        ll.add(d[2]);
//                    }
                }




            } catch (IOException e) {
                e.printStackTrace();
            }
            if (nextline == null) break;
        }
        System.out.println(sssd);
    }
}
